// 获取组织架构数据
import request from '@/utils/request'
export const reqGetDepartments = () => request({
  method: 'GET',
  url: '/company/department'
})

// 根据ID删除部门
export const reqDelDepartment = id => request({
  method: 'DELETE',
  url: `/company/department/${id}`
})

// 新增部门
export const reqAddDepartment = data => request({
  method: 'POST',
  url: '/company/department',
  data
})

// 根据ID查询部门详情
export const reqGetDepartDetailById = id => request({
  method: 'GET',
  url: `/company/department/${id}`
})

// 根据ID修改部门详情
export const reqEditDepartDetailById = data => request({
  method: 'PUT',
  url: `/company/department/${data.id}`,
  data
})
